package cz.cvut.fit.mi.dpo.mvc.model.elements;

/**
 * @author David Pertl
 * @author Martin Štekl <steklmar@fit.cvut.cz>
 */
public abstract class AElement {

    private static int ID_GENERATOR = 0;
    private int id;
    private int x;
    private int y;

    public AElement(int x, int y) {
        this.id = ID_GENERATOR++;
        setX(x);
        setY(y);
    }

    public int getId() {
        return id;
    }

    public int getX() {
        return x;
    }

    public AElement setX(int x) {
        this.x = x;
        return this;
    }

    public int getY() {
        return y;
    }

    public AElement setY(int y) {
        this.y = y;
        return this;
    }
}
